import request from '@/utils/request'

// 查询船只信息列表
export function listBoat(query) {
  return request({
    url: '/system/boat/list',
    method: 'get',
    params: query
  })
}

// 根据景区id获取景区下的所有船只信息。
export function getBoatListByScenicId(scenicId) {
  return request({
    url: '/system/boat/getBoatListByScenicId/' + scenicId,
    method: 'get'
  })
}

// 查询船只信息详细
export function getBoat(boatId) {
  return request({
    url: '/system/boat/' + boatId,
    method: 'get'
  })
}

// 新增船只信息
export function addBoat(data) {
  return request({
    url: '/system/boat',
    method: 'post',
    data: data
  })
}

// 修改船只信息
export function updateBoat(data) {
  return request({
    url: '/system/boat',
    method: 'put',
    data: data
  })
}

// 删除船只信息
export function delBoat(boatId) {
  return request({
    url: '/system/boat/' + boatId,
    method: 'delete'
  })
}

// 删除船只图片
export function deleteBoatPic(data) {
  return request({
    url: '/system/boat/deleteBoatPic',
    method: 'post',
    data: data
  })
}
